package com.cxs.exception;

import com.cxs.enums.HospitalErrorResultEnum;

/*
 * @Author:cxs
 * @Date:2021/10/15  15:13
 * @Version 1.0
 * @Motto:放下杂念,只为迎接明天更好的自己
 * */
public class HospitalException extends RuntimeException{

    private Integer code;

    public HospitalException(Integer code , String message) {
        super(message);
        this.code = code;
    }

    public HospitalException(HospitalErrorResultEnum enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
